<?php

namespace app\admin\controller;

use app\admin\model\Category;
use think\facade\Db;
use think\facade\View;
class Goods
{
    public function cate()
    {
        $id=input('get.id','');
        // 所有列表
        $list=Category::getCateList($id);
        View::assign('list',$list);

        // 下拉菜单全部分类
        $list2=Category::getAllCateList();
        View::assign('list2',$list2);
        return view();
    }

    public function goodAdd()
    {

        $arr=\app\admin\model\Goods::searchAttr($where);
        return view();
    }

    public function goodEdit()
    {
        return view();
    }

    public function goodList()
    {
        // 商品列表
//        list($where)=\app\admin\logic\Goods::ss();
        $where=[];
        $list=\app\admin\model\Goods::getGoodsList($where,$order);
        View::assign('list',$list);
        echo "<pre>";
        print_r($list->toArray());
        echo "</pre>";
        return view();
    }

    // 模糊搜索
    public function searchAttr()
    {
        View::assign('list',$list);
    }
}